﻿using System.Collections.Generic;
using System.Web.Mvc;
using Journal.Common.Helpers.HtmlControls;

namespace Journal.Common.Objects.Column
{
    public class ButtonColumn : IBaseColumn
    {
        public ButtonColumn(string text)
        {
            Text = text;
        }

        public ButtonColumn(string text, object attributes) : this(text)
        {
            Attributes = attributes;
        }

        public MvcHtmlString Render()
        {
            return ButtonControls.Button(Text, Attributes, DataParams);
        }

        public string Text { get; set; }

        public object Attributes { get; set; }

        public IDictionary<string, string> DataParams { get; set; }
    }
}